A set of patches has just landed on main, which convert our ESLint configuration to use newer ESLint's "flat" configuration format.
There are a few things to be aware of:
browser/components/asrouter
browser/components/aboutwelcome
browser/extensions/newtab
tools/ts
/* eslint-env foo */
will no longer work.*.worker.mjs
for a
worker), or update the list in eslint-file-globals.config.mjs
.eslint-rollouts.config.mjs
for the details about options..eslintignore
file has now moved
to eslint-ignores.config.mjs
eslint-subdirs.config.mjs
.
However, please do not add to this file without talking to the frontend
code reviewers group first. We generally want rules to be
consistent across the whole tree, and there may be other ways of
achieving what you need.If you have any general questions, please ask in the
#lint:mozilla.org channel (aka Lint and Formatting) on Matrix.
The flat configuration provides a deterministic setup, and paths the way for upgrading to ESLint v9. In turn, this will allow us to pick up some new features in ESLint, and also tidy up a lot of the older configuration code.
Mark.